package com.gaga.console.base.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * 基础信息
 */
@Data
public class BaseEntity<T> extends BaseMapEntity {


    @ApiModelProperty(value = "备注")
    @TableField(value = "remark")
    private String remark;

    @ApiModelProperty("是否启用")
    @TableField(value = "enabled")
    private Integer enabled;

    @ApiModelProperty(value = "排序")
    @TableField(value = "seq_no")
    private Integer seqNo;

    /**
     * 删除状态（0正常 1 已删除）
     */
    @ApiModelProperty(value = "是否删除")
    @TableField(value = "del_flag")
    private String delFlag;

    /**
     * 创建者
     */
    @ApiModelProperty(value = "创建者")
    @TableField(value = "create_by", fill = FieldFill.INSERT)
    private Integer createBy;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新者
     */
    @ApiModelProperty(value = "更新者")
    @TableField(value = "update_by", fill = FieldFill.UPDATE)
    private Integer updateBy;

    /**
     * 更新时间
     */
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;


    /**
     * 删除者
     */
    @ApiModelProperty(value = "删除者")
    @TableField("delete_by")
    private Integer deleteBy;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @TableField(value = "delete_time", fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deleteTime;

}
